<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Warehouse extends Model
{
    use HasFactory;

    protected $fillable = ['company_id','project_id','admin_id','name','type','encoding','number','price','specification','brand','unit','data_cleaning','useds','inventory','differences','delivery_note_number','unit_price','abnormal','remarks'];
    const POSTONLY = ['company_id','project_id','admin_id','name','type','encoding','number','price','specification','brand','unit','data_cleaning','useds','inventory','differences','delivery_note_number','unit_price','abnormal','remarks'];

    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }

}
